package p270jp.pxv.android.viewholder;

import android.view.View;
import android.view.ViewGroup;
import p134ei.AnalyticsScreenName;
import p270jp.pxv.android.legacy.model.PixivIllust;
import p307l9.EdgeTreatment;
import p521th.FlexibleItemAdapterSolidItem;
import p521th.SolidItemViewHolder;

/* renamed from: jp.pxv.android.viewholder.IllustRankingTopSolidItem */
/* loaded from: classes2.dex */
public class IllustRankingTopSolidItem extends FlexibleItemAdapterSolidItem {
    private final View.OnClickListener clickListener;
    private final PixivIllust illust;
    private final int rowNumber;
    private final AnalyticsScreenName screenName;

    public IllustRankingTopSolidItem(PixivIllust pixivIllust, int i, View.OnClickListener onClickListener, AnalyticsScreenName cVar) {
        EdgeTreatment.m3909i(pixivIllust);
        this.illust = pixivIllust;
        this.rowNumber = i;
        this.clickListener = onClickListener;
        this.screenName = cVar;
    }

    @Override // p521th.FlexibleItemAdapterSolidItem
    public int getSpanSize() {
        return 2;
    }

    @Override // p521th.FlexibleItemAdapterSolidItem
    public SolidItemViewHolder onCreateViewHolder(ViewGroup viewGroup) {
        return IllustRankingTopItemViewHolder.createViewHolder(this.illust, viewGroup, this.clickListener, this.screenName);
    }

    @Override // p521th.FlexibleItemAdapterSolidItem
    public boolean shouldBeInserted(int i, int i2, int i3, int i4) {
        return i2 == this.rowNumber;
    }
}
